<!DOCTYPE html>
<html>
<head>
    <title>学习资料</title>
    <#include "/header.html">
    <script src="${request.contextPath}/statics/libs/ajaxupload.js"></script>
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList" >
        <div class="grid-btn">
            <div v-show="sc">
                <i class="fa fa-child" style="font-size: 50px"></i>
                当前课程为：
                <span id="lab_name" style="font-size: 30px"> </span>
                <i class="fa fa-reply-all" aria-hidden="true" style="font-size: 40px;color:#0d6aad;"   onclick="javascript :history.go(-1)" ></i>
            </div>
            <div class="form-group col-sm-2">
                <input type="text" class="form-control" v-model="q.courseName" @keyup.enter="query" placeholder="课程名">
            </div>
            <a class="btn btn-default" @click="query">查询</a>
            <a class="btn btn-primary" @click="add" v-show="sc"><i class="fa fa-plus"></i>&nbsp;新增</a>

            <a class="btn btn-primary" @click="update" v-show="sc"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>

            <a class="btn btn-primary" @click="del" v-show="sc"><i class="fa fa-trash-o"></i>&nbsp;删除</a>

        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div  v-show="!showList"  class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-2 control-label">资料名称</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="jxStudyFile.fileName" placeholder="资料名称"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">文件类型</div>
                <label class="radio-inline">
                    <input type="radio" name="status" value="1" v-model="jxStudyFile.fileType"/>视频
                </label>
                <label class="radio-inline">
                    <input type="radio" name="status" value="0" v-model="jxStudyFile.fileType"/> 文档
                </label>
            </div>

           <div class="form-group" v-show="!showVideo" >
                <div class="col-sm-2 control-label">上传的视频</div>
                <div class="col-sm-10">
                  <video  v-show="!showVideo"  style="width: 150px; height: 200px"  id="video"   ></video>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">文件</div>
                <div class="col-sm-10">
                    <a class="btn btn-primary" id="upload"><i class="fa fa-plus"></i>&nbsp;上传文件</a>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">资料介绍</div>
                <div class="col-sm-10">
                    <!--<input type="text" class="form-control" v-model="jxStudyFile.fileDesc" placeholder="资料介绍"/>-->
                    <textarea type="text" class="form-control" v-model="jxStudyFile.fileDesc" style="height: 200px;" placeholder="资料介绍"></textarea>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">资料排序</div>
                <div class="col-sm-10">
                    <input type="number" class="form-control" v-model="jxStudyFile.orderNum" placeholder="0"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..."
                       @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/sys/jxstudyfile.js?_${.now?long}"></script>
</body>
</html>